{% extends "base.html" %}
{% block title %}
留言
{% end %}
{% block header %}
<link href="/static/css/pygments.css" rel="stylesheet">
<script>
    /*function weiboLogin() {
        WB2.login(function (o) {
            alert(111);
            alert(o);
        });
    }
*/
    WB2.anyWhere(function (W) {
        W.widget.connectButton({
            id: "wb_connect_btn",
            type: '3,2',
            callback: {
                login: function (o) { //登录后的回调函数
                    console.log(o)
//                    alert("login: " + o.screen_name)
                },
                logout: function () { //退出后的回调函数
//                    alert('logout');
                }
            }
        });
    });
</script>
{% end %}

{% autoescape None %}

{% block left_block %}
<div class="comments-full">
    <div>有什么想跟这个懒惰的站长说的呢？</div>

    <div class="comment">

        <form class="form-horizontal" role="form">

            <div class="form-group">
                <label class="col-sm-3 control-label">留言內容</label>

                <div class="col-md-8">
                    <textarea class="form-control" rows="10"
                              placeholder="留言内容" name="content"></textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-offset-2 col-md-4">
                    <button type="submit" class="btn btn-default">留个言</button>
                </div>
                <div  class="col-md-offset-3 col-md-3" id="wb_connect_btn"></div>
            </div>
            <!--<button type="button" class="btn btn-default" onclick="weiboLogin()">test</button>-->

            <!--<wb:login-button type="3,2" onlogin="login" onlogout="logout">登录按钮</wb:login-button>-->
        </form>
    </div>
</div>
{% end %}

{% block right_block %}

{% end %}
